﻿using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using NLog.Web;

namespace BlogDemo.Api
{
    public class Program
    {
        public static void Main(string[] args)
        {
            // NLogBuilder.ConfigureNLog("nlog1.config");

            Application.Configuration.AutoMapperConfiguration.Configure();
            var webHost = CreateHostBuilder(args).Build();

            webHost.Run();
        }

        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
           .ConfigureWebHostDefaults(webBuilder =>
           {
               webBuilder.UseStartup<Startup>();
           })
            .UseNLog();

    }
}
